<?php


    // Author: Tomasz Durka
    // Date: 5th February 2007
    // Prints out a link for PHP nails
    
    
  function iframe ($params = array()) {
  

    
    $height = '';
    $width = '';
    
    foreach($params as $_key => $_val) {
      switch ($_key) {
        case 'width':
        case 'height':
          $$_key = " {$_key}=\"{$_val}\"";
          break;
        case 'location':
        case 'url':
          $location =  '/' . $_val;
          break;
        default:
          $$_key = $_val;
          break;
      }
    }
    
    
    return "<iframe src=\"{$location}\"{$width}{$height}></iframe>";
    
  }

?>